package com.zx.notification.common.dao;

import com.zx.notification.common.model.InboxReadRecords;
import com.zx.notification.common.vo.InboxReadRecordsVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface InboxReadRecordsMapper {

    int deleteByPrimaryKey(@Param("id") String id);

    int insert(InboxReadRecords row);

    int insertSelective(InboxReadRecords row);

    InboxReadRecords selectByPrimaryKey(@Param("id") String id);

    int updateByPrimaryKeySelective(InboxReadRecords row);

    int updateByPrimaryKey(InboxReadRecords row);


    Long getInboxReadRecordsListCount(@Param("userId") String userId,
                                      @Param("notificationId") String notificationId,
                                      @Param("readStatus") String readStatus);

    List<InboxReadRecordsVO> getInboxReadRecordsListByPage(@Param("userId") String userId,
                                                           @Param("notificationId") String notificationId,
                                                           @Param("readStatus") String readStatus,
                                                           @Param("pageNum") Long pageNum,
                                                           @Param("pageSize") Long pageSize);

    List<InboxReadRecordsVO> selectByUserIdAndReadStatus(@Param("userId") String userId,
                                                         @Param("readStatus") String readStatus);

    List<InboxReadRecords> selectByNotificationId(@Param("notificationId") String notificationId);
}